package holder;

import com.example.googlemarketdemo.R;
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;

import conf.constants.URLS;

import utils.BitmapHepler;
import utils.UIUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import base.BaseHolder;
import bean.SubjectInfoBean;
/**
 * 专题的子条目
 * @author Anson-pc
 *
 */
public class SubjectHolder extends BaseHolder<SubjectInfoBean>{

	@ViewInject(R.id.item_subject_iv_icon)
	ImageView mIvIcon;
	
	@ViewInject(R.id.item_subject_tv_title)
	TextView mTvTitle;
	
	@Override
	protected View initHolderView() {
		View view = View.inflate(UIUtils.getContext(), R.layout.item_subject, null);
		ViewUtils.inject(this, view);
		return view;
	}

	@Override
	protected void refreshHolderView(SubjectInfoBean data) {
		mTvTitle.setText(data.des);
		BitmapHepler.display(mIvIcon, URLS.IMAGEBASEURL+data.url);
	}

}
